﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DSkin.Forms;
using DSkin.Controls;
using TY_Hoist.WinApp.Code;
using System.Configuration;
using System.Threading;
using System.Threading.Tasks;
using TY_WinApp.Wrapper;
using System.Runtime.InteropServices;

namespace TY_Hoist.WinApp
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }
        RemoteControl remoteControl;
        private void Form3_Load(object sender, EventArgs e)
        {
            remoteControl = new RemoteControl();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            remoteControl.MotorRight(true);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            remoteControl.MotorRight(false);

        }

        private void button3_Click(object sender, EventArgs e)
        {
            remoteControl.MotorLeft(true);

        }

        private void button4_Click(object sender, EventArgs e)
        {
            remoteControl.MotorLeft(false);

        }

        private void Form3_FormClosing(object sender, FormClosingEventArgs e)
        {
            remoteControl.Clear();
            remoteControl.Dispose();
        }
    }
}
